//
//  WBConstant.swift
//  SainMicroblog
//
//  Created by chenxinju on 16/5/3.
//  Copyright © 2016年 chenxinju-a2. All rights reserved.
//

//import Foundation
import UIKit
/// 输出日志

/// - parameter message:  日志消息

/// - parameter logError: 错误标记，默认是 false，如果是 true，发布时仍然会输出

/// - parameter file:     文件名

/// - parameter method:   方法名

/// - parameter line:     代码行数

func printLog<T>(message: T,
    logError: Bool = false,
    file: String = __FILE__,
    method: String = __FUNCTION__,
    line: Int = __LINE__)
{
    if logError {
        print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)")
    } else {
        #if DEBUG
            print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)")
        #endif
    }
}

//let AppKey = "2165126232"
//let AppSecret = "0b05a37ec7ead5dc329aa70914e946d4"
//let AppRedictUrl = "http://www.itheima.com/"

//MARK:-- 微博的注册信息

let AppKey = "718015919"
let AppSecret = "5bf53078d500057ec962f99492c3d07e"
let AppRedictUrl = "http://www.devshaw.com"

///  通知的名称
let kNotificationChangeViewControler = "kNotificationChangeViewControler"


/// RGB颜色
func RGB(r r: CGFloat, g: CGFloat, b: CGFloat) -> UIColor {
    return UIColor(red: r / 255, green: g / 255, blue: b / 255, alpha: 1)
}

/// 随机颜色
func RandomColor() -> UIColor {
    return RGB(r: CGFloat(random()) % 256, g: CGFloat(random()) % 256, b: CGFloat(random()) % 256)
}


//屏幕宽度
let  WBUIScreenW = UIScreen.mainScreen().bounds.width
let  WBUIScreenH = UIScreen.mainScreen().bounds.height

let WBUIScreenBounds = UIScreen.mainScreen().bounds



